const {chromium,firefox} = require('playwright');

(async () => {
  console.time('chrome');
  const browser = await chromium.launch({headless: true});
  const page = await browser.newPage();
  await page.goto('https://www.baidu.com/s?wd=2%E5%8A%A0%E5%BC%BA%E6%B0%91%E8%88%AA%E5%AE%89%E5%85%A8%E9%9A%90%E6%82%A3%E6%8E%92%E6%9F%A5');
  await page.waitForSelector('#content_left > div');
  let eles = await page.$$('#content_left > div');
  console.log(eles.length);
  console.timeEnd('chrome');
  browser.close();
})();
